package com.cicd.order.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @作者 itcast
 * @创建日期 2020/8/4 9:49
 **/
@Slf4j
@RestController
@RequestMapping("order")
public class OrderController {

    @RequestMapping("{id}")
    public String findOrderById(@PathVariable Integer id){
        log.info("method is {} , params is {}","findById",id);
        if(id==5){
            log.error("method is {} , params is {} , msg is {}","findById",id,"id不能为5");
            return null;
        }
        return "ID为"+id+"的订单信息" ;
    }

}
